package com.tedu._04mybatis.mapper;

import com.tedu._04mybatis.pojo.Comment;
import com.tedu._04mybatis.pojo.CommentVO2;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommentMapper {
    //@Insert("INSERT INTO comment(content,user_id,weibo_id,created) values(#{content},#{created},#{weiboId},#{userId})")
    int insertComment(Comment comment);

    //@Delete("DELETE FROM comment WHERE id= #{id}")
    int deleteCommentById(Integer id);


    int updateCommentById(Comment comment);



    Comment selectCommentVO1ById(Integer id);


    List<CommentVO2> selectAllCommentVO2WeiboId(Integer id);

    int dynamicUpdateComment(Comment comment);

    int dynamicDeleteComment(Integer[] ids);


}
